﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                  assembly="KuaJing.Security"
				        namespace="KuaJing.Security.Domain">

  <class  name="Role" table="Security_Role">
    <id name="Id" access="field.camelcase"
        column="RoleId" type="Int32">
      <generator class="native" />
    </id>
    <version name="Version" access="field.camelcase" />
    <set name="Users" table="Security_Role_MembershipUser" >
      <key column="RoleId"  foreign-key="fk_Role_MembershipUser"></key>
      <many-to-many class="KuaJing.Security.Domain.MembershipUser,KuaJing.Security" column="MembershipUserId" />
    </set>
    <property name="Name" />
    <property name="ReserveRole" />
    <property name="CreatedTime" access="field.camelcase" />
    <property name="CreatedUserName" access="field.camelcase" />
    <property name="ModifiedTime" access="field.camelcase" />
    <property name="ModifiedUserName" access="field.camelcase" />
    <property name="AccessedTime" access="field.camelcase" />
    <property name="AccessedUserName" access="field.camelcase" />
    <property name="Memo" />
    <property name="IsInvalid" />
  </class>
</hibernate-mapping>
